# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

_realname=Role-Tiny
pkgname=perl-${_realname}
pkgver=2.001004
pkgrel=1
pkgdesc="Roles. Like a nouvelle cuisine portion size slice of Moose."
arch=('any')
url="https://search.cpan.org/dist/Role-Tiny/"
license=('PerlArtistic' 'GPL')
depends=('perl')
checkdepends=('perl-Test-Fatal>=0.003')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Role-Tiny-${pkgver}.tar.gz)
sha512sums=('818373746cc4d86f87f9f88adf7f108de396f135e5dd1e380bf7722503675cacd9ee1d0d1f1eb2cd7851e50121504f94db02b3b67512d4069d7fdec94e441130')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}
